package tv.youxing.android.adapter;

import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;

import java.util.ArrayList;
import java.util.List;

import tv.youxing.android.R;
import tv.youxing.android.entity.HomeModel;

/**
 * Created by Administrator on 2017/6/17.
 */

public class HomeFragment_AlbumClassifys_Adapter extends RecyclerView.Adapter {


    private List<HomeModel.ResultBean.AlbumClassifysBean> tablayoutList = new ArrayList<>();


    public HomeFragment_AlbumClassifys_Adapter(List<HomeModel.ResultBean.AlbumClassifysBean> tablayoutList) {
        this.tablayoutList = tablayoutList;
    }

    @Override
    public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
        final holder h = new holder(LayoutInflater.from(parent.getContext()).inflate(R.layout.layout_item_tab,parent,false));

        return h;
    }

    @Override
    public void onBindViewHolder(RecyclerView.ViewHolder holder, int position) {

    }

    @Override
    public int getItemCount() {
        return tablayoutList.size();
    }


    class holder extends RecyclerView.ViewHolder {

        ImageView iv;
        TextView tv;

        public holder(View itemView) {
            super(itemView);

            iv = (ImageView) itemView.findViewById(R.id.imageView);
            tv = (TextView) itemView.findViewById(R.id.textView);

        }
    }
}

